<!DOCTYPE html>
<html>
<head>
    <title></title>
    <#include "/header.html">
    <script src="${request.contextPath}/statics/libs/ajaxupload.js"></script>
    <link rel="stylesheet" href="${request.contextPath}/statics/css/bootstrap-table.min.css">
    <link rel="stylesheet" href="${request.contextPath}/statics/plugins/treegrid/jquery.treegrid.css">
    <script src="${request.contextPath}/statics/libs/bootstrap-table.min.js"></script>
    <script src="${request.contextPath}/statics/plugins/treegrid/jquery.treegrid.min.js"></script>
    <script src="${request.contextPath}/statics/plugins/treegrid/jquery.treegrid.bootstrap3.js"></script>
    <script src="${request.contextPath}/statics/plugins/treegrid/jquery.treegrid.extension.js"></script>
    <script src="${request.contextPath}/statics/plugins/treegrid/tree.table.js"></script>
    <style>
        #treeDiv{
            overflow-y:auto;
            overflow-x: auto;
            height: 600px;

        }



    </style>
</head>
<body>
<div id="rrapp" v-cloak>
    <div class="row">
    <div class="form-group col-md-2" id="treeDiv">
        <select  class="form-control" @change="getCourseTree2" v-model="course">
            <option value="-200">请选择课程</option>
            <option v-for="item in courseList"  :value="item">{{item.name}}</option>
        </select>
        <ul id="courseTree2" class="ztree"></ul>
    </div>

    <div class="col-md-10">
    <div v-show="showList">
       <div class="grid-btn">

            <!--<a class="btn btn-primary" @click="add"><i class="fa fa-plus"></i>&nbsp;新增</a>-->
           <a class="btn btn-primary" id="upload"><i class="fa fa-plus"></i>&nbsp;批量上传</a>
           <a class="btn btn-danger" @click="deleteCourseTest()"><i class="fa fa-trash-o"></i>&nbsp;删除课程题目</a>
           <a class="btn btn-primary" @click="exportCourseTest()"><i class="fa fa-external-link"></i>&nbsp;批量导出</a>
           <a id="export" href="" target="_blank" ></a>
<!--
            <a class="btn btn-primary" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</a>


            <a class="btn btn-primary" @click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</a>-->

        </div>
        <div style="margin-left: auto;margin-right: auto; margin-bottom: 10px;width: 300px;">
            <b id="kcmc" style="margin-left: 100px; font-size: 20px;">课程名称</b>
            <br>
            <b  style="margin-left: 50px; font-size: 15px;">{{course.name}} --> {{courseBody.name}}</b>

            <!--<input type="text" id="CourseInput" class="form-control" style="cursor:pointer; text-align: center"  v-model=""  @click="courseTree"  readonly="readonly" placeholder="所有课程"/>-->
        </div>
        <table id="jqGrid"></table>
        <div id="jqGridPager"></div>
    </div>

    <div v-show="!showList" class="panel panel-default">
        <div class="panel-heading">{{title}}--{{course.name}} --> {{courseBody.name}}</div>
        <form class="form-horizontal">

            <div class="form-group">
                <div class="col-sm-2 control-label">题目类型</div>
                <div class="col-sm-10" v-show="chooseTest.questionTypeId==0">

                    <input type="text" class="form-control" readonly="readonly" placeholder="判断题"/>
                </div>
                <div class="col-sm-10" v-show="chooseTest.questionTypeId==1">

                    <input type="text" class="form-control" readonly="readonly" placeholder="单选题"/>                </div>
                <div class="col-sm-10" v-show="chooseTest.questionTypeId==2">

                    <input type="text" class="form-control" readonly="readonly" placeholder="多选题"/>                </div>

                <div class="col-sm-10" v-show="chooseTest.questionTypeId==3">

                    <input type="text" class="form-control" readonly="readonly" placeholder="简答题"/>                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-2 control-label">题干</div>
                <div class="col-sm-10">
                    <input type="text" class="form-control" v-model="chooseTest.questionContent" placeholder=""/>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-2 control-label">题干图片</div>
                <div class="col-sm-10">
                    <img id="questonContentImg"  width="80px" height="80px">
                    <a class="btn btn-primary" id="uploadquestonContentImg"><i class="fa fa-plus"></i>&nbsp;上传文件</a>
                    <a  class="btn btn-primary" @click = "delquestonContentImg"><i class="glyphicon glyphicon-minus"></i>&nbsp;删除图片</a>
                </div>
            </div>

	<!--<div v-if="questionTypeIdd == 1 || questionTypeIdd == 0">-->
            <div v-show="lable1">
            <div class="form-group">
                <div class="col-sm-2 control-label">选项1</div>
                <div class="col-sm-10">
                    <input type="text" class="form-control" v-model="chooseTest.optionOne" placeholder="选项1"/>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-2 control-label">选项1图片</div>
                <div class="col-sm-10">
                    <img id="optionOneImg"  width="80px" height="80px">
                    <a class="btn btn-primary" id="uploadoptionOneImg"><i class="fa fa-plus"></i>&nbsp;上传文件</a>
                    <a  class="btn btn-primary" @click = "deloptionOneImg"><i class="glyphicon glyphicon-minus"></i>&nbsp;删除图片</a>
                </div>

            </div >
            <div class="form-group">
                <div class="col-sm-2 control-label">选项2</div>
                <div class="col-sm-10">
                    <input type="text" class="form-control" v-model="chooseTest.optionTwo" placeholder="选项2"/>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-2 control-label">选项2图片</div>
                <div class="col-sm-10">
                    <img id="optionTwoImg"  width="80px" height="80px">
                    <!--<input class="form-control" type="hidden" v-model="course.coverPath" placeholder="封面图片">-->
                    <!--<input type="text" class="form-control" v-model="course.coverPath" placeholder="封面图片路径"/>-->
                    <a class="btn btn-primary" id="uploadoptionTwoImg"><i class="fa fa-plus"></i>&nbsp;上传文件</a>
                    <a  class="btn btn-primary" @click = "deloptionTwoImg"><i class="glyphicon glyphicon-minus"></i>&nbsp;删除图片</a>
                </div>
            </div>
            </div>
           <!--<div v-show="questionTypeIdd == 1">-->
            <div v-show="lable2">
               <div class="form-group">
                   <div class="col-sm-2 control-label">选项3</div>
                   <div class="col-sm-10">
                       <input type="text" class="form-control" v-model="chooseTest.optionThree" placeholder="选项3"/>
                   </div>
               </div>
               <div class="form-group">
                   <div class="col-sm-2 control-label">选项3图片</div>
                   <div class="col-sm-10">
                       <img id="optionThreeImg"  width="80px" height="80px">
                       <!--<input class="form-control" type="hidden" v-model="course.coverPath" placeholder="封面图片">-->
                       <!--<input type="text" class="form-control" v-model="course.coverPath" placeholder="封面图片路径"/>-->
                       <a class="btn btn-primary" id="uploadoptionThreeImg"><i class="fa fa-plus"></i>&nbsp;上传文件</a>
                       <a  class="btn btn-primary" @click = "deloptionThreeImg"><i class="glyphicon glyphicon-minus"></i>&nbsp;删除图片</a>
                   </div>
               </div>
               <div class="form-group">
                   <div class="col-sm-2 control-label">选项4</div>
                   <div class="col-sm-10">
                       <input type="text" class="form-control" v-model="chooseTest.optionFour" placeholder="选项4"/>
                   </div>
               </div>
               <div class="form-group">
                   <div class="col-sm-2 control-label">选项4图片</div>
                   <div class="col-sm-10">
                       <img id="optionFourImg"  width="80px" height="80px">
                       <!--<input class="form-control" type="hidden" v-model="course.coverPath" placeholder="封面图片">-->
                       <!--<input type="text" class="form-control" v-model="course.coverPath" placeholder="封面图片路径"/>-->
                       <a class="btn btn-primary" id="uploadoptionFourImg"><i class="fa fa-plus"></i>&nbsp;上传文件</a>
                       <a  class="btn btn-primary" @click = "deloptionFourImg"><i class="glyphicon glyphicon-minus"></i>&nbsp;删除图片</a>
                   </div>
               </div>
            </div>
           <!--</div>-->

<!--</div>-->
            <div class="form-group">
                <div class="col-sm-2 control-label">答案</div>
                <div class="col-sm-10">
                    <input type="text" class="form-control" v-model="chooseTest.answer" placeholder="答案"/>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-2 control-label">答案解析</div>
                <div class="col-sm-10">
                    <input type="text" class="form-control" v-model="chooseTest.analysis" placeholder="答案解析"/>
                </div>
            </div>

            <div class="form-group">
                <div class="col-sm-2 control-label">解析图片</div>
                <div class="col-sm-10">
                    <img id="analysisImg"  width="80px" height="80px">
                    <!--<input class="form-control" type="hidden" v-model="course.coverPath" placeholder="封面图片">-->
                    <!--<input type="text" class="form-control" v-model="course.coverPath" placeholder="封面图片路径"/>-->
                    <a class="btn btn-primary" id="uploadanalysisImg"><i class="fa fa-plus"></i>&nbsp;上传文件</a>
                    <a  class="btn btn-primary" @click = "delalayisImg"><i class="glyphicon glyphicon-minus"></i>&nbsp;删除图片</a>
                </div>

            </div>



		<div class="form-group">
                <div class="col-sm-2 control-label"></div>
                <input type="button" class="btn btn-primary" @click="saveOrUpdate" value="确定"/>
                &nbsp;&nbsp;<input type="button" class="btn btn-warning" @click="reload" value="返回"/>
            </div>
        </form>
    </div>
    </div>
    </div>
    </div>

<script src="${request.contextPath}/statics/js/modules/myCourse/courseChooseTest.js?_${.now?long}"></script>
</body>
</html>